DEFINITION FOR C MODULE ModeKeys ;

FROM Graphics IMPORT DIPF_IS_DUALPF, DIPF_IS_PF2PRI, DIPF_IS_HAM,
		     DIPF_IS_EXTRAHALFBRITE ;

CONST
  INVALID_ID = -1 ;

(* With all the new modes that are available under V38 and V39, it is highly  *)
(* recommended that you use either the asl.library screenmode requester,      *)
(* and/or the V39 graphics.library function BestModeIDA().		      *)
(*									      *)
(* DO NOT interpret the any of the bits in the ModeID for its meaning. For    *)
(* example, do not interpret bit 3 (0x4) as meaning the ModeID is interlaced. *)
(* Instead, use GetDisplayInfoData() with DTAG_DISP, and examine the DIPF_... *)
(* flags to determine a ModeID's characteristics. The only exception to	      *)
(* this rule is that bit 7 (0x80) will always mean the ModeID is	      *)
(* ExtraHalfBright, and bit 11 (0x800) will always mean the ModeID is HAM.    *)

  (* normal identifiers *)

  MONITOR_ID_MASK		= 0FFFF1000H ;

  DEFAULT_MONITOR_ID		= 000000000H ;
  NTSC_MONITOR_ID		= 000011000H ;
  PAL_MONITOR_ID		= 000021000H ;

(* the following 22 composite keys are for Modes on the default Monitor. *)
(* NTSC & PAL "flavors" of these particular keys may be made by or'ing	 *)
(* the NTSC or PAL MONITOR_ID with the desired MODE_KEY...		 *)
(*									 *)
(* For example, to specifically open a PAL HAM interlaced ViewPort	 *)
(* (or intuition screen), you would use the modeid of			 *)
(* (PAL_MONITOR_ID | HAMLACE_KEY)					 *)

  LORES_KEY			= 000000000H ;
  HIRES_KEY			= 000008000H ;
  SUPER_KEY			= 000008020H ;
  HAM_KEY			= 000000800H ;
  LORESLACE_KEY			= 000000004H ;
  HIRESLACE_KEY			= 000008004H ;
  SUPERLACE_KEY			= 000008024H ;
  HAMLACE_KEY			= 000000804H ;
  LORESDPF_KEY			= 000000400H ;
  HIRESDPF_KEY			= 000008400H ;
  SUPERDPF_KEY			= 000008420H ;
  LORESLACEDPF_KEY		= 000000404H ;
  HIRESLACEDPF_KEY		= 000008404H ;
  SUPERLACEDPF_KEY		= 000008424H ;
  LORESDPF2_KEY			= 000000440H ;
  HIRESDPF2_KEY			= 000008440H ;
  SUPERDPF2_KEY			= 000008460H ;
  LORESLACEDPF2_KEY		= 000000444H ;
  HIRESLACEDPF2_KEY		= 000008444H ;
  SUPERLACEDPF2_KEY		= 000008464H ;
  EXTRAHALFBRITE_KEY		= 000000080H ;
  EXTRAHALFBRITELACE_KEY	= 000000084H ;

  (* New for AA ChipSet (V39) *)

  HIRESHAM_KEY			= 000008800H ;
  SUPERHAM_KEY			= 000008820H ;
  HIRESEHB_KEY			= 000008080H ;
  SUPEREHB_KEY			= 0000080A0H ;
  HIRESHAMLACE_KEY		= 000008804H ;
  SUPERHAMLACE_KEY		= 000008824H ;
  HIRESEHBLACE_KEY		= 000008084H ;
  SUPEREHBLACE_KEY		= 0000080A4H ;

  (* Added for V40 - may be useful modes for some games or animations. *)

  LORESSDBL_KEY			= 000000008H ;
  LORESHAMSDBL_KEY		= 000000808H ;
  LORESEHBSDBL_KEY		= 000000088H ;
  HIRESHAMSDBL_KEY		= 000008808H ;


  (* VGA identifiers *)

  VGA_MONITOR_ID		= 000031000H ;

  VGAEXTRALORES_KEY		= 000031004H ;
  VGALORES_KEY			= 000039004H ;
  VGAPRODUCT_KEY		= 000039024H ;
  VGAHAM_KEY			= 000031804H ;
  VGAEXTRALORESLACE_KEY		= 000031005H ;
  VGALORESLACE_KEY		= 000039005H ;
  VGAPRODUCTLACE_KEY		= 000039025H ;
  VGAHAMLACE_KEY		= 000031805H ;
  VGAEXTRALORESDPF_KEY		= 000031404H ;
  VGALORESDPF_KEY		= 000039404H ;
  VGAPRODUCTDPF_KEY		= 000039424H ;
  VGAEXTRALORESLACEDPF_KEY	= 000031405H ;
  VGALORESLACEDPF_KEY		= 000039405H ;
  VGAPRODUCTLACEDPF_KEY		= 000039425H ;
  VGAEXTRALORESDPF2_KEY		= 000031444H ;
  VGALORESDPF2_KEY		= 000039444H ;
  VGAPRODUCTDPF2_KEY		= 000039464H ;
  VGAEXTRALORESLACEDPF2_KEY	= 000031445H ;
  VGALORESLACEDPF2_KEY		= 000039445H ;
  VGAPRODUCTLACEDPF2_KEY	= 000039465H ;
  VGAEXTRAHALFBRITE_KEY		= 000031084H ;
  VGAEXTRAHALFBRITELACE_KEY	= 000031085H ;

  (* New for AA ChipSet (V39) *)

  VGAPRODUCTHAM_KEY		= 000039824H ;
  VGALORESHAM_KEY		= 000039804H ;
  VGAEXTRALORESHAM_KEY		= VGAHAM_KEY ;
  VGAPRODUCTHAMLACE_KEY		= 000039825H ;
  VGALORESHAMLACE_KEY		= 000039805H ;
  VGAEXTRALORESHAMLACE_KEY	= VGAHAMLACE_KEY ;
  VGAEXTRALORESEHB_KEY		= VGAEXTRAHALFBRITE_KEY ;
  VGAEXTRALORESEHBLACE_KEY	= VGAEXTRAHALFBRITELACE_KEY ;
  VGALORESEHB_KEY		= 000039084H ;
  VGALORESEHBLACE_KEY		= 000039085H ;
  VGAEHB_KEY			= 0000390A4H ;
  VGAEHBLACE_KEY		= 0000390A5H ;

(* These ModeIDs are the scandoubled equivalents of the above, with the *)
(* exception of the DualPlayfield modes, as AA does not allow for	*)
(* scandoubling dualplayfield.						*)

  VGAEXTRALORESDBL_KEY		= 000031000H ;
  VGALORESDBL_KEY		= 000039000H ;
  VGAPRODUCTDBL_KEY		= 000039020H ;
  VGAEXTRALORESHAMDBL_KEY	= 000031800H ;
  VGALORESHAMDBL_KEY		= 000039800H ;
  VGAPRODUCTHAMDBL_KEY		= 000039820H ;
  VGAEXTRALORESEHBDBL_KEY	= 000031080H ;
  VGALORESEHBDBL_KEY		= 000039080H ;
  VGAPRODUCTEHBDBL_KEY		= 0000390A0H ;

  (* a2024 identifiers *)

  A2024_MONITOR_ID		= 000041000H ;

  A2024TENHERTZ_KEY		= 000041000H ;
  A2024FIFTEENHERTZ_KEY		= 000049000H ;

  (* prototype identifiers (private) *)

  PROTO_MONITOR_ID		= 000051000H ;


  (* These monitors and modes were added for the V38 release. *)

  EURO72_MONITOR_ID		= 000061000H ;

  EURO72EXTRALORES_KEY		= 000061004H ;
  EURO72LORES_KEY		= 000069004H ;
  EURO72PRODUCT_KEY		= 000069024H ;
  EURO72HAM_KEY			= 000061804H ;
  EURO72EXTRALORESLACE_KEY	= 000061005H ;
  EURO72LORESLACE_KEY		= 000069005H ;
  EURO72PRODUCTLACE_KEY		= 000069025H ;
  EURO72HAMLACE_KEY		= 000061805H ;
  EURO72EXTRALORESDPF_KEY	= 000061404H ;
  EURO72LORESDPF_KEY		= 000069404H ;
  EURO72PRODUCTDPF_KEY		= 000069424H ;
  EURO72EXTRALORESLACEDPF_KEY	= 000061405H ;
  EURO72LORESLACEDPF_KEY	= 000069405H ;
  EURO72PRODUCTLACEDPF_KEY	= 000069425H ;
  EURO72EXTRALORESDPF2_KEY	= 000061444H ;
  EURO72LORESDPF2_KEY		= 000069444H ;
  EURO72PRODUCTDPF2_KEY		= 000069464H ;
  EURO72EXTRALORESLACEDPF2_KEY	= 000061445H ;
  EURO72LORESLACEDPF2_KEY	= 000069445H ;
  EURO72PRODUCTLACEDPF2_KEY	= 000069465H ;
  EURO72EXTRAHALFBRITE_KEY	= 000061084H ;
  EURO72EXTRAHALFBRITELACE_KEY	= 000061085H ;

  (* New AA modes (V39) *)

  EURO72PRODUCTHAM_KEY		= 000069824H ;
  EURO72PRODUCTHAMLACE_KEY	= 000069825H ;
  EURO72LORESHAM_KEY		= 000069804H ;
  EURO72LORESHAMLACE_KEY	= 000069805H ;
  EURO72EXTRALORESHAM_KEY	= EURO72HAM_KEY ;
  EURO72EXTRALORESHAMLACE_KEY	= EURO72HAMLACE_KEY ;
  EURO72EXTRALORESEHB_KEY	= EURO72EXTRAHALFBRITE_KEY ;
  EURO72EXTRALORESEHBLACE_KEY	= EURO72EXTRAHALFBRITELACE_KEY ;
  EURO72LORESEHB_KEY		= 000069084H ;
  EURO72LORESEHBLACE_KEY	= 000069085H ;
  EURO72EHB_KEY			= 0000690A4H ;
  EURO72EHBLACE_KEY		= 0000690A5H ;

(* These ModeIDs are the scandoubled equivalents of the above, with the	*)
(* exception of the DualPlayfield modes, as AA does not allow for	*)
(* scandoubling dualplayfield.						*)

  EURO72EXTRALORESDBL_KEY	= 000061000H ;
  EURO72LORESDBL_KEY		= 000069000H ;
  EURO72PRODUCTDBL_KEY		= 000069020H ;
  EURO72EXTRALORESHAMDBL_KEY	= 000061800H ;
  EURO72LORESHAMDBL_KEY		= 000069800H ;
  EURO72PRODUCTHAMDBL_KEY	= 000069820H ;
  EURO72EXTRALORESEHBDBL_KEY	= 000061080H ;
  EURO72LORESEHBDBL_KEY		= 000069080H ;
  EURO72PRODUCTEHBDBL_KEY	= 0000690A0H ;


  EURO36_MONITOR_ID		= 000071000H ;

(* Euro36 modeids can be ORed with the default modeids a la NTSC and PAL. *)
(* For example, Euro36 SuperHires is					  *)
(* (EURO36_MONITOR_ID | SUPER_KEY)					  *)

  SUPER72_MONITOR_ID		= 000081000H ;

(* Super72 modeids can be ORed with the default modeids a la NTSC and PAL. *)
(* For example, Super72 SuperHiresLace (800x600) is			   *)
(* (SUPER72_MONITOR_ID | SUPERLACE_KEY).				   *)
(* The following scandoubled Modes are the exception:			   *)

  SUPER72LORESDBL_KEY		= 000081008H ;
  SUPER72HIRESDBL_KEY		= 000089008H ;
  SUPER72SUPERDBL_KEY		= 000089028H ;
  SUPER72LORESHAMDBL_KEY	= 000081808H ;
  SUPER72HIRESHAMDBL_KEY	= 000089808H ;
  SUPER72SUPERHAMDBL_KEY	= 000089828H ;
  SUPER72LORESEHBDBL_KEY	= 000081088H ;
  SUPER72HIRESEHBDBL_KEY	= 000089088H ;
  SUPER72SUPEREHBDBL_KEY	= 0000890A8H ;


  (* These monitors and modes were added for the V39 release. *)

  DBLNTSC_MONITOR_ID		= 000091000H ;

  DBLNTSCLORES_KEY		= 000091000H ;
  DBLNTSCLORESFF_KEY		= 000091004H ;
  DBLNTSCLORESHAM_KEY		= 000091800H ;
  DBLNTSCLORESHAMFF_KEY		= 000091804H ;
  DBLNTSCLORESEHB_KEY		= 000091080H ;
  DBLNTSCLORESEHBFF_KEY		= 000091084H ;
  DBLNTSCLORESLACE_KEY		= 000091005H ;
  DBLNTSCLORESHAMLACE_KEY	= 000091805H ;
  DBLNTSCLORESEHBLACE_KEY	= 000091085H ;
  DBLNTSCLORESDPF_KEY		= 000091400H ;
  DBLNTSCLORESDPFFF_KEY		= 000091404H ;
  DBLNTSCLORESDPFLACE_KEY	= 000091405H ;
  DBLNTSCLORESDPF2_KEY		= 000091440H ;
  DBLNTSCLORESDPF2FF_KEY	= 000091444H ;
  DBLNTSCLORESDPF2LACE_KEY	= 000091445H ;
  DBLNTSCHIRES_KEY		= 000099000H ;
  DBLNTSCHIRESFF_KEY		= 000099004H ;
  DBLNTSCHIRESHAM_KEY		= 000099800H ;
  DBLNTSCHIRESHAMFF_KEY		= 000099804H ;
  DBLNTSCHIRESLACE_KEY		= 000099005H ;
  DBLNTSCHIRESHAMLACE_KEY	= 000099805H ;
  DBLNTSCHIRESEHB_KEY		= 000099080H ;
  DBLNTSCHIRESEHBFF_KEY		= 000099084H ;
  DBLNTSCHIRESEHBLACE_KEY	= 000099085H ;
  DBLNTSCHIRESDPF_KEY		= 000099400H ;
  DBLNTSCHIRESDPFFF_KEY		= 000099404H ;
  DBLNTSCHIRESDPFLACE_KEY	= 000099405H ;
  DBLNTSCHIRESDPF2_KEY		= 000099440H ;
  DBLNTSCHIRESDPF2FF_KEY	= 000099444H ;
  DBLNTSCHIRESDPF2LACE_KEY	= 000099445H ;
  DBLNTSCEXTRALORES_KEY		= 000091200H ;
  DBLNTSCEXTRALORESHAM_KEY	= 000091A00H ;
  DBLNTSCEXTRALORESEHB_KEY	= 000091280H ;
  DBLNTSCEXTRALORESDPF_KEY	= 000091600H ;
  DBLNTSCEXTRALORESDPF2_KEY	= 000091640H ;
  DBLNTSCEXTRALORESFF_KEY	= 000091204H ;
  DBLNTSCEXTRALORESHAMFF_KEY	= 000091A04H ;
  DBLNTSCEXTRALORESEHBFF_KEY	= 000091284H ;
  DBLNTSCEXTRALORESDPFFF_KEY	= 000091604H ;
  DBLNTSCEXTRALORESDPF2FF_KEY	= 000091644H ;
  DBLNTSCEXTRALORESLACE_KEY	= 000091205H ;
  DBLNTSCEXTRALORESHAMLACE_KEY	= 000091A05H ;
  DBLNTSCEXTRALORESEHBLACE_KEY	= 000091285H ;
  DBLNTSCEXTRALORESDPFLACE_KEY	= 000091605H ;
  DBLNTSCEXTRALORESDPF2LACE_KEY	= 000091645H ;

  DBLPAL_MONITOR_ID		= 0000A1000H ;

  DBLPALLORES_KEY		= 0000A1000H ;
  DBLPALLORESFF_KEY		= 0000A1004H ;
  DBLPALLORESHAM_KEY		= 0000A1800H ;
  DBLPALLORESHAMFF_KEY		= 0000A1804H ;
  DBLPALLORESEHB_KEY		= 0000A1080H ;
  DBLPALLORESEHBFF_KEY		= 0000A1084H ;
  DBLPALLORESLACE_KEY		= 0000A1005H ;
  DBLPALLORESHAMLACE_KEY	= 0000A1805H ;
  DBLPALLORESEHBLACE_KEY	= 0000A1085H ;
  DBLPALLORESDPF_KEY		= 0000A1400H ;
  DBLPALLORESDPFFF_KEY		= 0000A1404H ;
  DBLPALLORESDPFLACE_KEY	= 0000A1405H ;
  DBLPALLORESDPF2_KEY		= 0000A1440H ;
  DBLPALLORESDPF2FF_KEY		= 0000A1444H ;
  DBLPALLORESDPF2LACE_KEY	= 0000A1445H ;
  DBLPALHIRES_KEY		= 0000A9000H ;
  DBLPALHIRESFF_KEY		= 0000A9004H ;
  DBLPALHIRESHAM_KEY		= 0000A9800H ;
  DBLPALHIRESHAMFF_KEY		= 0000A9804H ;
  DBLPALHIRESLACE_KEY		= 0000A9005H ;
  DBLPALHIRESHAMLACE_KEY	= 0000A9805H ;
  DBLPALHIRESEHB_KEY		= 0000A9080H ;
  DBLPALHIRESEHBFF_KEY		= 0000A9084H ;
  DBLPALHIRESEHBLACE_KEY	= 0000A9085H ;
  DBLPALHIRESDPF_KEY		= 0000A9400H ;
  DBLPALHIRESDPFFF_KEY		= 0000A9404H ;
  DBLPALHIRESDPFLACE_KEY	= 0000A9405H ;
  DBLPALHIRESDPF2_KEY		= 0000A9440H ;
  DBLPALHIRESDPF2FF_KEY		= 0000A9444H ;
  DBLPALHIRESDPF2LACE_KEY	= 0000A9445H ;
  DBLPALEXTRALORES_KEY		= 0000A1200H ;
  DBLPALEXTRALORESHAM_KEY	= 0000A1A00H ;
  DBLPALEXTRALORESEHB_KEY	= 0000A1280H ;
  DBLPALEXTRALORESDPF_KEY	= 0000A1600H ;
  DBLPALEXTRALORESDPF2_KEY	= 0000A1640H ;
  DBLPALEXTRALORESFF_KEY	= 0000A1204H ;
  DBLPALEXTRALORESHAMFF_KEY	= 0000A1A04H ;
  DBLPALEXTRALORESEHBFF_KEY	= 0000A1284H ;
  DBLPALEXTRALORESDPFFF_KEY	= 0000A1604H ;
  DBLPALEXTRALORESDPF2FF_KEY	= 0000A1644H ;
  DBLPALEXTRALORESLACE_KEY	= 0000A1205H ;
  DBLPALEXTRALORESHAMLACE_KEY	= 0000A1A05H ;
  DBLPALEXTRALORESEHBLACE_KEY	= 0000A1285H ;
  DBLPALEXTRALORESDPFLACE_KEY	= 0000A1605H ;
  DBLPALEXTRALORESDPF2LACE_KEY	= 0000A1645H ;


  (* Use these tags for passing to BestModeID() (V39) *)

  SPECIAL_FLAGS = DIPF_IS_DUALPF+DIPF_IS_PF2PRI+DIPF_IS_HAM+
  		  DIPF_IS_EXTRAHALFBRITE ;

  BIDTAG_DIPFMustHave	= 080000001H ;
  				(* mask of the DIPF_ flags the ID must have   *)
				(* Default - NULL			      *)

  BIDTAG_DIPFMustNotHave = 080000002H ;
  				(* mask of the DIPF_flags the ID must not have*)
				(* Default - SPECIAL_FLAGS		      *)

  BIDTAG_ViewPort	= 080000003H ;
  				(* ViewPort for which a ModeID is sought.     *)
				(* Default - NULL *)

  BIDTAG_NominalWidth	= 080000004H ;	(* \ together make the aspect ratio *)
  					(*  } and			    *)
  BIDTAG_NominalHeight	= 080000005H ;	(* / override the vp->Width/Height. *)

				(* Default - SourceID NominalDimensionInfo, *)
				(* or vp->DWidth/Height, or (640 * 200),    *)
				(* in that preferred order.		    *)

  BIDTAG_DesiredWidth	= 080000006H ;	(* \ Nominal Width and Height of the *)
  BIDTAG_DesiredHeight	= 080000007H ;  (* / returned ModeID.		     *)
					(* Default - same as Nominal	     *)

  BIDTAG_Depth		= 080000008H ;
  				(* ModeID must support this depth.	     *)
				(* Default - vp->RasInfo->BitMap->Depth or 1 *)

  BIDTAG_MonitorID	= 080000009H ;
  				(* ModeID must use this monitor.	*)
				(* Default - use best monitor available *)

  BIDTAG_SourceID	= 08000000AH ;
  				(* instead of a ViewPort.		      *)
				(* Default - VPModeID(vp) if BIDTAG_ViewPort  *)
				(* is specified, else leave the DIPFMustHave  *)
				(* and DIPFMustNotHave values untouched.      *)

  BIDTAG_RedBits	= 08000000BH ;	(* \ 				 *)
  BIDTAG_BlueBits	= 08000000CH ;	(*  } Match up from the database *)
  BIDTAG_GreenBits	= 08000000DH ;	(* /				 *)
					(* Default - 4			 *)

  BIDTAG_GfxPrivate	= 08000000EH ;	(* Private *)

END ModeKeys.
